/**
 * 
 */
package qzsmk;

import com.lanswon.qzsmk.service.commonservice.ResultVo;
import com.lanswon.qzsmk.service.commonservice.impl.DockingInternetService;
import com.lanswon.qzsmk.service.commonservice.impl.DockingInternetServiceImplService;

/**
 * 
 * @ClassName: zmtest.java
 * @Description: 该类的功能描述
 *
 * @version: v1.0.0
 * @author: zm
 * @date: 2018年5月8日 下午5:15:56
 *
 */
public class zmtest {
	public static void main(String[] args) {
		
		
		// 1查询需要挂失卡信息
		// http://localhost:8080/qzsmk/app/queryLossCard.do?paperType=00&paperNo=323111111111111112&citizenCardNo=110000000004&startLine=0&numPerPage=20&currentPage=1
		// LossCardInfo lci = new LossCardInfo();
		// lci.setPaperType("00");
		// lci.setPaperNo("323111111111111112");
		// lci.setCitizenCardNo("110000000004");
		// lci.setStartLine(0);
		// lci.setCurrentPage(1);
		// lci.setNumPerPage(20);
		// ResultVo vo = lass.getLossAndUnbindServicePort().queryLossCard(lci);
		// ResultStatus status = vo.getResultStatus();
		// DwzPage dwzPage = (DwzPage) vo.getServiceObject();
		// List<Object> lasslist = dwzPage.getList();
		// for (Object obj : lasslist) {
		// LossCardInfo li = (LossCardInfo) obj;
		// System.out.println(li);
		// }

		// 2提交挂失信息
		// http://localhost:8080/qzsmk/app/commitLossCardInfo.do?paperTypeName=%E8%BA%AB%E4%BB%BD%E8%AF%81&paperNo=323111111111111115&citizenCardNo=120000000005&cardPName=%E5%BB%BA%E8%AE%BE%E9%93%B6%E8%A1%8C%E8%81%94%E5%90%8D%E5%8D%A1&customerName=%E5%B0%8F%E6%83%A0%E5%AD%90&cardStatus=3
		// LossCardInfo lci = new LossCardInfo();
		// lci.setCitizenCardNo("120000000005");
		// lci.setCardPName("建设银行联名卡");
		// lci.setPaperTypeName("身份证");
		// lci.setPaperNo("323111111111111115");
		// lci.setCustomerName("小惠子");
		// lci.setCardStatus("3");
		//
		// ResultVo vo = lass.getLossAndUnbindServicePort().commitLossCardInfo(lci);
		// ResultStatus status = vo.getResultStatus();
		// VoucherVo voucherVo = (VoucherVo) vo.getServiceObject();
		// System.out.println(voucherVo);

		// 3.查询需要补卡信息
		// http://localhost:8080/qzsmk/app/querySupplementCard.do?paperType=00&paperNo=323111111111111111&startLine=0&numPerPage=20&currentPage=1
		// SupplementCardInfo sci = new SupplementCardInfo();
		// sci.setPaperType("00");
		// sci.setPaperNo("320927198809302160");
		// sci.setStartLine(0);
		// sci.setNumPerPage(20);
		// sci.setCurrentPage(1);
		// cardService.getSupplementCardServicePort().querySupplementCard(sci);
		// ResultVo vo =
		// cardService.getSupplementCardServicePort().querySupplementCard(sci);
		// ResultStatus status = vo.getResultStatus();
		// DwzPage dwzPage = (DwzPage) vo.getServiceObject();
		// List<Object> lasslist = dwzPage.getList();
		// for (Object obj : lasslist) {
		// LossCardInfo li = (LossCardInfo) obj;
		// System.out.println(li.getAgentName());
		// }

		// 4提交补卡请求
		// http://localhost:8080/qzsmk/app/commitSupplementCardInfo.do?paperType=%E8%BA%AB%E4%BB%BD%E8%AF%81&paperNo=323111111111111115&OldCitizenCardNo=120000000005&customerName=%E5%B0%8F%E6%83%A0%E5%AD%90
		// SupplementCardInfo sci = new SupplementCardInfo();
		// GregorianCalendar gcDate = new GregorianCalendar();
		// GregorianCalendar gcGetDate = new GregorianCalendar();
		// // 当前日期
		// Calendar cal = Calendar.getInstance();
		// Date date = cal.getTime();
		// // 日期加3天
		// cal.add(Calendar.DAY_OF_YEAR, 3);
		// Date getDate = cal.getTime();
		// // 设置转换
		// gcDate.setTime(date);
		// gcGetDate.setTime(getDate);
		//
		// XMLGregorianCalendar XMLDate = null;
		// XMLGregorianCalendar XMLGetDate = null;
		// try {
		// XMLDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcDate);
		// XMLGetDate =
		// DatatypeFactory.newInstance().newXMLGregorianCalendar(gcGetDate);
		// } catch (Exception e) {
		// e.printStackTrace();
		// }
		// sci.setOldCitizenCardNo("120000000005");
		// sci.setSupplementCardDate(XMLDate);
		// sci.setGetCardDate(XMLGetDate);
		// sci.setCustomerName("小惠子");
		// sci.setPaperType("身份证");
		// sci.setPaperNo("323111111111111115");
		// cardService.getSupplementCardServicePort().commitSupplementCardInfo(sci);
		// ResultVo vo =
		// cardService.getSupplementCardServicePort().commitSupplementCardInfo(sci);
		// ResultStatus status = vo.getResultStatus();
		// VoucherVo voucherVo = (VoucherVo) vo.getServiceObject();
		// System.out.println();
		// 5查询网点
		// http://localhost:8080/qzsmk/app/queryBranch.do
		// com.lanswon.qzsmk.service.systemmanageservice.ResultVo vo =
		// service.getBranchManageServicePort().queryBranch();
		// com.lanswon.qzsmk.service.systemmanageservice.ResultObject obj =
		// (com.lanswon.qzsmk.service.systemmanageservice.ResultObject) vo
		// .getServiceObject();
		// List<Object> list = obj.getList();
		// com.lanswon.qzsmk.service.systemmanageservice.ResultStatus status
		// =vo.getResultStatus();
		// System.out.println(status.getCode());
		// for (Object o : list) {
		// Org org = (Org) o;
		// System.out.println(org.getOrgId());
		// System.out.println(org.getOrgName());
		// System.out.println(org.getPrincipal());
		// System.out.println(org.getLinkMan());
		// System.out.println(org.getAddress());
		// }

		// 6验证能否办理相关卡产品
		// http://localhost:8080/qzsmk/app/checkIsCardProductbyPaperNo.do?paperType=00&paperNo=320925198607124123cardProductCode=80
		// ResultVo vo
		// =applyCardServiceService.getApplyCardServicePort().checkIsCardProductbyPaperNo("00",
		// "320925198607124123", "80");
		// ResultObject ro =(ResultObject) vo.getServiceObject();
		// System.out.println(ro.getVariable());

		// 7.个人申请提交
		// http://localhost:8080/qzsmk/app/checkIsCardProductbyPaperNo.do?paperType=00&paperNo=320925198607124123cardProductCode=80
		/*try {
			 Personal personal = new Personal();
			 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			 GregorianCalendar gcDate = new GregorianCalendar();
			 gcDate.setTime(sdf.parse("2018-6-1"));
			 XMLGregorianCalendar XMLDate =
			 DatatypeFactory.newInstance().newXMLGregorianCalendar(gcDate);
			 personal.setCustomerName("徐东雅苑");
			 personal.setGender("男");
			 personal.setNationality("汉族");
			 personal.setBirthday(XMLDate);
			 personal.setPaperType("00");
			 personal.setPaperNo("630925198809303619");//320925198607224410
			 personal.setCorpName("蓝远望");
			 personal.setMobile("13039112178");
			 String cardProductCode = "17";
			 ResultVo resultVo = applyCardServiceService.getApplyCardServicePort().singleApplication(personal,
					 cardProductCode, "1");
			 System.out.println(resultVo.getResultStatus().getCode()+":"+resultVo.getResultStatus().getMessage());
				//2.然后在取值 
				System.out.println(((VoucherVo)resultVo.getServiceObject()).toString());
		 
		 } catch (Exception e) {
			 e.printStackTrace();
		 }*/
		
		// 8基础信息查询 
		 /*com.lanswon.qzsmk.service.systemmanageservice.ResultVo resultVo = paramManageService.getParamManageServicePort().queryAllCertificates();
		 System.out.println(resultVo.getResultStatus().getCode());
		 System.out.println(resultVo.getServiceObject());*/
		 
		//9基础信息查询（卡产品）
		 /*com.lanswon.qzsmk.service.systemmanageservice.ResultVo resultVo = paramManageService.getParamManageServicePort().queryAllCardProdunctDefinition();
		 System.out.println(resultVo.getResultStatus().getCode());
		 System.out.println(resultVo.getServiceObject().getClass().getName());*/
		//10基础信息查询（卡物理类型）
		 /*com.lanswon.qzsmk.service.systemmanageservice.ResultVo resultVo = paramManageService.getParamManageServicePort().queryAllCardPhysicsType();
		 System.out.println(resultVo.getResultStatus().getCode());*/
		
		// 个人申请提交
		// 11基础信息查询(个人信息)
		/*ResultVo resultVo = applyCardServiceService.getApplyCardServicePort().queryPersonalByPaperNoAndPaperType("00","620925198809303619");
		 System.out.println(resultVo);*/
		
		
		
		//12基础信息查询(卡相关信息查询)320925198607224192   320922198809131462
		//for(int i=3;i<100;i++) {80（卡产品类型）320925198809303610（证件号）00（身份证） 
			//System.out.println(i);
			/*com.lanswon.qzsmk.service.systemmanageservice.ResultVo resultVo = paramManageService
					.getParamManageServicePort().queryPersonalCardInfoAndConsumeRecordsByPaperNo("00", "320721199101011237","14",
							"","","2018","05","");
			System.out.println(resultVo);*/
			//System.out.println("================");
		//}
		
		//13基础信息查询(卡申请进度查询)
		/*String paperNo = "320721199101011234";//320721199101011238
		String paperType = "00";
		String queryCondition = "";
		ResultVo resultVo = applyCardServiceService.getApplyCardServicePort().queryApplySchedule(paperNo,paperType, queryCondition);
		System.out.println(resultVo);*/
		
		//14 基础信息查询(通过挂失凭证号查询)
		/*ResultVo resultVo1 = lass.getLossAndUnbindServicePort().queryPersonal("7350532a5ffb11e88c12c85b76d6a059");
		System.out.println(resultVo1);*/
		
		//15基础信息查询(根据条件获取个人所有卡产品)
		/*String paperType = "00";
		String paperNo = "620925198809303619";
		String condition = "1";
		ResultVo resultVo = applyCardServiceService.getApplyCardServicePort().query(paperType, paperNo, condition);
		System.out.println(resultVo.getResultStatus().getCode()
				+":"+resultVo.getResultStatus().getMessage());*/
		
		//16基础信息查询(交易查询前,获取用户下所有卡产品)
		/*String paperType = "00";
		String paperNo = "320721199101011236";
		String cardPCode = "";
		com.lanswon.qzsmk.service.systemmanageservice.ResultVo resultVo = 
				paramManageService.getParamManageServicePort().queryCardProdunctByPersonal(paperType, paperNo, cardPCode);
		System.out.println(resultVo.getResultStatus().getCode()
				+":"+resultVo.getResultStatus().getMessage());*/
			
		//ResultVo resultVo = dockingInternetService.queryNation();
		//System.out.println(resultVo);
		
	}
}
